<h3>참여하고 있는 프로젝트들</h3>
<br/>
<div class="table-responsive">
	<%= link_to '새 프로젝트 참여하기', new_project_path, :class => "btn btn-primary" %>

<table class="table table-striped table-hover">
  <thead>
    <tr>
      <th>프로젝트명</th>
      <th>참여자수</th>
      <th>모니터링파일수</th>
      <th>Owner</th>
      <th>기능</th>
    </tr>
  </thead>

  <tbody>
    <% @projects.each do |project| %>
      <tr>
        <td><%= link_to project.name, project %></td>
        <td><%= project.users.count %>명</td>
        <td><%= project.monitoring_files.count %></td>
        <td><%= project.owner.name %></td>
        <td><%= link_to '탈퇴', leave_project_path(project), data: { confirm: '탈퇴하시겠습니까?' } %>
        	<%= link_to '삭제', project, method: :delete, data: { confirm: '프로젝트를 삭제하시겠습니까?' } %></td>
      </tr>
    <% end %>
  </tbody>
</table>
</div>
<br>

<%= paginate @projects, :params => {:controller => 'projects', :action => 'index'} %>


